home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Sources / FWSclNot.cpp < prev    next >
Encoding:
Text File  |  1995-11-08  |  3.3 KB  |  101 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWSclNot.cpp
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWFrameW.hpp"
  11.  
  12. #ifndef FWSCLNOT_H
  13. #include "FWSclNot.h"
  14. #endif
  15.  
  16. //========================================================================================
  17. //    Runtime Info
  18. //========================================================================================
  19.  
  20. #if FW_LIB_EXPORT_PRAGMAS
  21. #pragma lib_export on
  22. #endif
  23.  
  24. #ifdef FW_BUILD_MAC
  25. #pragma segment FW_FrameSegment
  26. #endif
  27.  
  28. //========================================================================================
  29. //    CLASS FW_CScrollNotification
  30. //========================================================================================
  31.  
  32. const ODType FW_CScrollNotification::kName = "FW_CScrollNotification";
  33.  
  34. //----------------------------------------------------------------------------------------
  35. // FW_CScrollNotification::FW_CScrollNotification
  36. //----------------------------------------------------------------------------------------
  37.  
  38. FW_CScrollNotification::FW_CScrollNotification(const FW_CInterest& interest,
  39.                                                Direction direction,
  40.                                                FW_CFixed absolute, FW_CFixed delta,
  41.                                                FW_Boolean shouldScroll) :
  42.     FW_CNotification(interest),
  43.     fDirection(direction),
  44.     fAbsolute(absolute),
  45.     fDelta(delta),
  46.     fShouldScroll(shouldScroll)
  47. {
  48. }
  49.  
  50. //----------------------------------------------------------------------------------------
  51. // FW_CScrollNotification::FW_CScrollNotification
  52. //----------------------------------------------------------------------------------------
  53.  
  54. FW_CScrollNotification::FW_CScrollNotification(const FW_CScrollNotification& other) :
  55.     FW_CNotification(other),
  56.     fDirection(other.fDirection),
  57.     fAbsolute(other.fAbsolute),
  58.     fDelta(other.fDelta),
  59.     fShouldScroll(other.fShouldScroll)
  60. {
  61. }
  62.  
  63. //----------------------------------------------------------------------------------------
  64. // FW_CScrollNotification::~FW_CScrollNotification
  65. //----------------------------------------------------------------------------------------
  66.  
  67. FW_CScrollNotification::~FW_CScrollNotification()
  68. {
  69. }
  70.  
  71. //----------------------------------------------------------------------------------------
  72. // FW_CScrollNotification::operator==
  73. //----------------------------------------------------------------------------------------
  74.  
  75. FW_Boolean FW_CScrollNotification::operator==(const FW_CScrollNotification& other)
  76. {
  77.     return FW_CNotification::operator==(other) &&
  78.                 fDirection == other.fDirection &&
  79.                 fAbsolute == other.fAbsolute &&
  80.                 fDelta == other.fDelta &&
  81.                 fShouldScroll == other.fShouldScroll;
  82. }
  83.  
  84. //----------------------------------------------------------------------------------------
  85. // FW_CScrollNotification::operator=
  86. //----------------------------------------------------------------------------------------
  87.  
  88. FW_CScrollNotification& FW_CScrollNotification::operator=(const FW_CScrollNotification& other)
  89. {
  90.     if (this == &other)
  91.         return *this;
  92.  
  93.     FW_CNotification::operator=(other);
  94.     fDirection = other.fDirection;
  95.     fAbsolute = other.fAbsolute;
  96.     fDelta = other.fDelta;
  97.     fShouldScroll = other.fShouldScroll;
  98.  
  99.     return *this;
  100. }
  101.